<style>
    .kuromi-radio {
        appearance: none;
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        border: 2px solid #9d4edd;
        border-radius: 50%;
        margin-right: 10px;
        cursor: pointer;
        position: relative;
        transition: all 0.2s;
    }
    
    .kuromi-radio:checked {
        background-color: #9d4edd;
        box-shadow: inset 0 0 0 3px white; /* 中心白点 */
    }
    
    .kuromi-radio:checked::after {
        content: '💜';
        position: absolute;
        font-size: 12px;
        top: -1px;
        left: 2px;
    }
    </style>

<form action="{% url 'polls:vote' question.id %}" method="post" style="font-family: 'Arial Rounded MT Bold', 'Comic Sans MS', cursive, sans-serif; max-width: 500px; margin: 20px auto; background: #f9f0ff; border-radius: 15px; padding: 20px; box-shadow: 0 5px 15px rgba(93, 0, 150, 0.2); border: 3px solid #9d4edd;">
    {% csrf_token %}
    <fieldset style="border: 2px dashed #c77dff; padding: 15px; border-radius: 10px; background: white;">
        <legend style="background: linear-gradient(135deg, #5a189a, #9d4edd); color: white; padding: 5px 15px; border-radius: 20px; font-size: 18px; text-align: center; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);">
            <h1 style="margin: 0; display: inline;"> {{ question.question_text }} </h1>
        </legend>
        
        {% if error_message %}
            <p style="color: #ff006e; font-weight: bold; background: #ffebf3; padding: 8px; border-radius: 5px; border-left: 4px solid #ff006e;">
                💢 {{ error_message }}
            </p>
        {% endif %}
        
        <div style="margin-top: 15px;">
        {% for choice in question.choice_set.all %}
            <div style="margin-bottom: 10px; display: flex; align-items: center;">
                <input 
                type="radio" 
                name="choice" 
                id="choice{{ forloop.counter }}" 
                value="{{ choice.id }}" 
                class="kuromi-radio"
                >
                <label 
                    for="choice{{ forloop.counter }}" 
                    style="color: #5a189a; font-weight: bold; cursor: pointer; flex: 1; padding: 8px 10px; border-radius: 8px; transition: all 0.3s; background: #f5e6ff;"
                    onmouseover="this.style.background='#ebd5ff'" 
                    onmouseout="this.style.background='#f5e6ff'"
                >
                    🎀 {{ choice.choice_text }}
                </label>
            </div>
        {% endfor %}
        </div>
    </fieldset>
    
    <div style="text-align: center; margin-top: 20px;">
        <input 
            type="submit" 
            value="VOTE 💜" 
            style="background: linear-gradient(135deg, #5a189a, #9d4edd); color: white; border: none; padding: 12px 25px; font-size: 16px; border-radius: 30px; cursor: pointer; font-weight: bold; box-shadow: 0 4px 8px rgba(93, 0, 150, 0.3); transition: all 0.3s;"
            onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 6px 12px rgba(93, 0, 150, 0.4)'"
            onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 4px 8px rgba(93, 0, 150, 0.3)'"
        >
    </div>
</form>